﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AnimEvent : MonoBehaviour
{
    PlayerController2D character;
    public Weapon weapon;
    private void Awake()
    {
        character = GetComponentInParent<PlayerController2D>();

    }
    public void Rush(float time)
    {
        character.Dush(time);
    }

    public void EndAttack()
    {
        character.EndAttack();
    }
    public void ActiveWeapon()
    {
        weapon.SetWeaponActive(true);
    }
    public void UnActiveWeapon()
    {
        weapon.SetWeaponActive(false);
    }
    public void SpawnBullet()
    {
        character.SpawnBullet();
    }
    public void PlayFootStep(){
        AudioManager.Instance.PlayAudio(Resources.Load<AudioClip>("Audio/zombie_five_footstep"));
    }
}
